package com.lianrui.core;

import org.apache.commons.lang.StringUtils;

/**
 * 功能描述：条件类
 * 
 * @author LJQ
 * 
 * <br>2016年1月8日 下午5:55:05
 */
public class Condition {
	
	private String key;
	
	private Object value;
	
	private String opt;
	
	public Condition() {
	}
	
	public Condition(String key, Object value) {
		super();
		this.key = key;
		this.value = value;
		this.opt = "=";
	}
	
	/**
	 * @param key
	 * @param value
	 * @param opt
	 */
	public Condition(String key, Object value, String opt) {
		super();
		this.key = key;
		this.value = value;
		this.opt = opt;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
	}

	public String getOpt() {
		if (StringUtils.isBlank(opt)) {
			opt = "=";
		}
		return opt;
	}

	public void setOpt(String opt) {
		this.opt = opt;
	}

}
